﻿using MugenInjection.Attributes;

namespace TestModels.Class
{
    public class ActivatorTestModel
    {
        private readonly string _constructorTest;

        private string _methodTest;

        public ActivatorTestModel()
        {
        }

        public ActivatorTestModel(string constructorTest)
        {
            _constructorTest = constructorTest;
        }

        [Inject]
#if SILVERLIGHT
        public string PropertyTest { get; set; }
#else
            protected string PropertyTest { get; set; }
#endif

        public string Method
        {
            get { return _methodTest; }
        }

        public string Constructor
        {
            get { return _constructorTest; }
        }

        public string Property
        {
            get { return PropertyTest; }
        }


#if !SILVERLIGHT
        [Inject]
        protected void MethodTest(string test)
        {
            _methodTest = test;
        }
#else
        [Inject]
        public void MethodTest(string test)
        {
            _methodTest = test;
        }
#endif
    }

    public struct ActivatorTestModelStruct
    {
        private readonly string _constructorTest;

        private string _methodTest;

        public ActivatorTestModelStruct(string constructorTest) : this()
        {
            _constructorTest = constructorTest;
            _methodTest = null;
            PropertyTest = null;
        }

        [Inject]
        public string PropertyTest { get; set; }

        public string Method
        {
            get { return _methodTest; }
        }

        public string Constructor
        {
            get { return _constructorTest; }
        }

        public string Property
        {
            get { return PropertyTest; }
        }


        [Inject]
        public void MethodTest(string test)
        {
            _methodTest = test;
        }
    }
}